Internal Links

In HTML5, it is possible to go to different parts wihin the same page by specifying the element's id.
To define a section of page, the attribute #id is used. An example about internal link is shown here:
	<!DOCTTYPE html> 
<!--Example: Internal link.html -->
<html>
<head>
<title> Internal link example </title>
</head>
<body>
<h1>
<!-- id attribute creates a section that can be linked to -->
<h2 id = "continents"> The 7 continents of the World </h2>
<!-- Here id attribute links to a section on the same page -->
<p> <a href = "#islands"> Go to <italic> beautiful islands </italic> </a> </p>
<ul>
<li> Africa </li>
<li> Asia </li>
<li> Europe </li>
<li> North America </li>
<li> South America </li>
</ul>
<!-- id attribute creates a section that can be linked to -->
<h2 id = "islands"> The World's Top 10 Islands </h2>
<p>
<!-- Here id attribute links to a section on the same page -->
<p> <a href = "#continents"> Go to <italic> the list of continents </italic> </a> </p>
</p>
</p>
<ol reversed >
<li> Bali, Indonesia </li>
<li> Ischia, Italy </li>
<li> Bali, Indonesia </li>
<li> Kauai, Hawaii </li>
<li> Maui, Hawaii </li>
<li> Santorini, Greece </li>
<li> Galapagos Islands, Ecuador </li>
<li> Borocay Island, Philippines </li>
<li> Hilton Head Island, South Carolina </li>
<li> Palawan, Philippines </li>
</ol>
</body>
</html>
Try the above HTML5 example and click on the internal links. Here is how the rendered HTML5 looks like:


For more details, please contact me here.
Date of last modification: 2020.